<div class="watch_msg vm">
	<h1><span></span>手表信息管理</h1>
	<div class="con">

		<!-- 表格头部信息 -->
		<div class="tb_hd">
			<div class="devs">设备数量 ：<span>{{number}}</span></div>
			<div class="search">
				<input type="text" ng-model="search" placeholder="精准搜索">
				<button class="sh" >搜索更多</button>
				<button class="add" ng-click="addUser(true)">添加</button>
				<button class="del" ng-click="delUser()">删除</button>
			</div>
			<div class="filter">
				<!-- 状态 : -->
				<span class="fl">状态:</span>
				<select ng-model="stateStr" ng-options="y.state for (x,y) in states"></select>
				<span class="fl">行数:</span>
				<select ng-model="lineNumber" ng-options="x for x in lineNumbers"></select>
			</div>
		</div>

		<!-- 表格主要部分 -->
		<table>
			<tr>
				<th>
					<input type="checkbox" class="allCheck">
				</th>
				<th>设备ID</th>
				<th>在线状态</th>
				<th>产品类型</th>
				<th>用户地址</th>
				<th>激活时间</th>
				<th>最后活跃时时间</th>
				<th>绑定帐号</th>
				<th>功能</th>
			</tr>
			<tr ng-repeat="x in opints | filter : search | filter : stateStr.str | limitTo : lineNumber" userID="{{x.id}}">
				<td>
					<input type="checkbox">
				</td>
				<td>{{x.devId}}</td>
				<td>{{x.state}}</td>
				<td>{{x.class}}</td>
				<td>{{x.address}}</td>
				<td>{{x.startTime}}</td>
				<td>{{x.lastUseTime}}</td>
				<td>{{x.phone}}</td>
				<td>
					<a href="{{usUrl}}">控制</a>
				</td>
			</tr>
		</table>
		<div class="tb_ft" ng-show="!hasSign">
			<span class="fr">
				<a class="fl unactive" ng-if="nowPage == maxPage">下一页</a>
				<a class="fl" ng-if="nowPage != maxPage">下一页</a>
			</span>
			<ul class="fr pages">
				<li>
					<a class="fl nowpage" ng-if="nowPage == 1">1</a>
					<a class="fl" ng-if="nowPage != 1">1</a>
				</li>
				<li style="color: #ccc;" ng-show="beforeLi">...</li>
				<li ng-repeat="x in pageArr">
					<a class="fl nowpage" ng-if="x == nowPage">{{x}}</a>
					<a class="fl" ng-if="x != nowPage">{{x}}</a>
				</li>
				<li style="color: #ccc;" ng-show="afterLi">...</li>
				<li ng-show="hasLastPage">
					<a class="fl nowpage" ng-if="nowPage == maxPage">{{maxPage}}</a>
					<a class="fl" ng-if="nowPage != maxPage">{{maxPage}}</a>
				</li>
			</ul>
			<span class="fr">
				<a class="fl unactive" ng-if="nowPage == 1">上一页</a>
				<a class="fl" ng-if="nowPage != 1">上一页</a>
			</span class="fr">
			<span>{{nowPage}}/{{maxPage}}</span>
		</div>

		<form class="adduser" name='userform' novalidate ng-show="addForm">
			<h3>新增</h3>
			<em ng-click="addUser(false)">✖</em>
			
			<div class="box">
				<label for="user_id">设备ID:</label>
				<input type="text" name='userID' id="user_id" ng-model="userID" ng-focus="idBool(false)" ng-blur="idBool(true)" required>
				<div class="errorBox">
				    <span style="color:red;font-size:12px;" ng-show="userform.idBlur && userform.userID.$dirty">
				    	<span ng-show="userform.userID.$error.required">请填写设备ID</span>
				    </span>
		   		</div>
			</div>

			<label for="dev_class">产品类型:</label>
			<input type="text" name='devClass' id="dev_class" ng-model="devClass" ng-focus="devBool(false)" ng-blur="devBool(true)" required>
			 <div class="errorBox">
			    <span style="color:red;font-size:12px;" ng-show="userform.devBlur && userform.devClass.$dirty">
			    	<span ng-show="userform.devClass.$error.required">请填写产品类型</span>
			    </span>
	   		</div>

	   		<label for="us_address">用户地址:</label>
			<input type="text" name='usAddress' id="us_address" ng-model="usAddress" ng-focus="addressBool(false)" ng-blur="addressBool(true)" required>
			 <div class="errorBox">
			    <span style="color:red;font-size:12px;" ng-show="userform.addressBlur && userform.usAddress.$dirty">
			    	<span ng-show="userform.usAddress.$error.required">请填写用户地址</span>
			    </span>
	   		</div>

	   		<label for="acc">绑定账号:</label>
			<input type="text" name='account' id="acc" ng-model="account" ng-focus="accBool(false)" ng-blur="accBool(true)" required>
			 <div class="errorBox">
			    <span style="color:red;font-size:12px;" ng-show="userform.accBlur && userform.account.$dirty">
			    	<span ng-show="userform.account.$error.required">请填写绑定账号</span>
			    </span>
	   		</div>

	   		<div class="fm_ft">
	   			<button ng-click="addUser(false)">取消</button>
	   			<button ng-disabled="userform.$invalid">保存</button>
	   		</div>
		</form>

		<div class="nothing" ng-show="hasSign">
			对不起，没有获取到你要的信息
		</div>
	</div>
</div>